﻿<views:MvxWpfView
	x:Class="Sidvall.LogManager.UI.Wpf.Views.DocumentationView"
	xmlns:views="clr-namespace:MvvmCross.Wpf.Views;assembly=MvvmCross.Wpf"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:vms="clr-namespace:Sidvall.LogManager.UI.ViewModels;assembly=Sidvall.LogManager.UI"
	xmlns:Controls="clr-namespace:Sidvall.LogManager.UI.Wpf.Controls" 
	xmlns:Converters="clr-namespace:Sidvall.UI.Wpf.Converters;assembly=Sidvall.UI.Wpf" 
	xmlns:local="clr-namespace:Sidvall.LogManager.UI.Wpf.Views"
	mc:Ignorable="d" 
	d:DesignHeight="500" d:DesignWidth="700">

	<views:MvxWpfView.Resources>
		<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
		<Converters:BooleanToVisibilityConverter x:Key="NotBooleanToVisibilityConverter" Not="True"/>
	</views:MvxWpfView.Resources>

	<Grid d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type vms:DocumentationViewModel}}">
		<Grid Visibility="{Binding OverviewIsVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Controls:HeaderControl HeaderCaption="Manual" />
			<Grid Grid.Row="1">
				<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
					<Image Source="/Sidvall.LogManager.UI.Wpf;component/Images/ProductionArchitecture.png" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="UniformToFill" Width="600"/>
				</ScrollViewer>
				<Canvas>
					<Controls:ButtonControl ImageWidth="30" ImageHeight="30" Canvas.Left="279" ImageSource="/Sidvall.LogManager.UI.Wpf;component/Images/Information.png"
											ToolTip="This is the tool you are using now" ButtonCommand="{Binding SelectHelpCommand}" ButtonCommandParameter="1" >
						<Controls:ButtonControl.ButtonMouseOverBackground>
							<SolidColorBrush Color="#FF0079A6" Opacity="0.2"/>
						</Controls:ButtonControl.ButtonMouseOverBackground>
					</Controls:ButtonControl>
					<Controls:ButtonControl ImageWidth="30" ImageHeight="30" Canvas.Left="179" Canvas.Top="152" ImageSource="/Sidvall.LogManager.UI.Wpf;component/Images/Information.png"
											ToolTip="A database with tables that the Authorization Manager&#x0a;uses to store information" ButtonCommand="{Binding SelectHelpCommand}" ButtonCommandParameter="2" >
						<Controls:ButtonControl.ButtonMouseOverBackground>
							<SolidColorBrush Color="#FF0079A6" Opacity="0.2"/>
						</Controls:ButtonControl.ButtonMouseOverBackground>
					</Controls:ButtonControl>

					<Button Content="Install Server" Canvas.Left="219" FontWeight="Bold" FontSize="16" Padding="5" Canvas.Top="182"
						Command="{Binding SelectPageCommand}" CommandParameter="2">
						<Button.Background>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
								<GradientStop Color="#FFAC9F9F" Offset="0"/>
								<GradientStop Color="White" Offset="1"/>
							</LinearGradientBrush>
						</Button.Background>
						<Button.Effect>
							<DropShadowEffect/>
						</Button.Effect>
					</Button>
				</Canvas>
				<Grid Width="300" Height="80" HorizontalAlignment="Right" VerticalAlignment="Top" Background="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"
					  Visibility="{Binding HelpTextIsVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition />
					</Grid.ColumnDefinitions>
					<Image Width="30" Height="30" Source="/Sidvall.LogManager.UI.Wpf;component/Images/Information.png" VerticalAlignment="Top"  />
					<TextBox Grid.Column="1" Text="{Binding HelpText}" TextWrapping="Wrap" IsReadOnly="True" VerticalScrollBarVisibility="Auto" BorderThickness="0">
						<TextBox.Background>
							<SolidColorBrush Color="White" Opacity="0"/>
						</TextBox.Background>
					</TextBox>
				</Grid>
			</Grid>
		</Grid>
		<Grid Grid.Row="1" Visibility="{Binding ServerIsVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Controls:HeaderControl HeaderCaption="Manual - Install Server" />
			<Grid Grid.Row="1">
				<Grid.Background>
					<SolidColorBrush Color="#FFD1E0F1" Opacity="0.6"/>
				</Grid.Background>
				<StackPanel Orientation="Horizontal">
					<Controls:ButtonControl ImageHeight="36" ImageWidth="36" ImageSource="/Sidvall.LogManager.UI.Wpf;component/Images/Back.png" 
										ToolTip="Back" ButtonCommand="{Binding SelectPageCommand}" ButtonCommandParameter="1" />
				</StackPanel>
			</Grid>
			<Grid Grid.Row="2">
				<TextBox Text="{Binding ServerScript}" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" FontFamily="Courier New" FontWeight="Normal" FontSize="12" />
			</Grid>
		</Grid>
	</Grid>
</views:MvxWpfView>
